#include<bits/stdc++.h>
#define ll long long
using namespace std;
ll n,a[100009],ans,MAX=INT_MIN;
bool bj[100009]={0,0,0,0,0};
ll ef(ll k)
{
    ll l=1,r=n;
    while(l<=r)
    {
        ll mid=(l+r)/2;
        if(bj[mid]==true)
        {
            l++;
            continue;
        }
        if(a[mid]<=k)
        l=mid+1;
        if(a[mid]>k)
        r=mid-1;
    }
    if(l<=n)
    return l;
    else
    return 0;
}
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    scanf("%lld",&n);
    for(ll i=1;i<=n;i++)
    {
        scanf("%lld",&a[i]);
        MAX=max(MAX,a[i]);
    }
    ans=n;
    sort(a+1,a+n+1);
    ll pre;
    for(ll i=1;i<=n;i++)
    {
        if(a[i]==MAX)
        {
            cout<<ans;
            return 0;
        }
        if(!pre&&a[i]==a[i-1])
        continue;
        ll t=ef(a[i]);
        if(t!=0&&bj[t]==false)
        {
            ans--;
            bj[t]=true;
        }
        pre=t;
    }
    cout<<ans;
    return 0;
}
